package cn.melon.view.admin.dorm.ctr;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import cn.melon.mod.dorm.DormInfo;
import cn.melon.mod.dorm.DormRequest;
import cn.melon.view.admin.dorm.AddDormDlg;

public class AddDormDlgCtr implements ActionListener {

    private AddDormDlg addDormDig = null;
    
    
    public AddDormDlgCtr(AddDormDlg dlg){
        this.addDormDig = dlg; 
    }
    @Override
    public void actionPerformed(ActionEvent e) {
        switch (e.getActionCommand()) {
        case "确定":
            DormInfo dormInfo = addDormDig.getDormInfo();
            DormRequest request = new DormRequest();
            request.addDormInfo(dormInfo);
            addDormDig.setVisible(false);
            break;
        case "取消":
            addDormDig.setVisible(false);
            break;
        default:
            break;
        }

    }

}
